//
//  NSString+Mango.h
//  Mango
//
//  Created by 胡超 on 2017/12/25.
//  Copyright © 2017年 胡超., ltd. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <NSData+Mango.h>

NS_ASSUME_NONNULL_BEGIN

@interface NSString (Mango)

/** md5值*/
@property (readonly) NSString *md5Str;
/** 文件md5值, 注意: self必须是一个文件路径*/
@property (readonly,nullable) NSString *fileMd5Str;
/** URL*/
@property (readonly,nullable) NSURL *url;
/** URL编码*/
@property (readonly) NSString *URLEncodedString;
/** URL解码*/
@property (readonly) NSString *URLDecodedString;
//@property (readonly) NSString *(^addURLParameters)(NSDictionary *parameters);

/** 是否有效身份证号码 只考虑2代身份证*/
@property (readonly) BOOL isValidIdentityNumber;
/** 是否纯中文汉字*/
@property (readonly) BOOL isChinese;
/** 是否包含中文*/
@property (readonly) BOOL isContainsChinese;
/** 是否是有效的身份证真实姓名*/
@property (readonly) BOOL isRealName;

/** 拼音*/
@property (readonly) NSString *pinyinStr;
/** 拼音首字母*/
@property (readonly) NSString *pinyinFirstWord;

- (NSString *)desEncryptString:(MGDESOptions)options key:(const void *)key iv:(const void *)iv;
- (NSString *)desDecryptString:(MGDESOptions)options key:(const void *)key iv:(const void *)iv;

@end

NS_ASSUME_NONNULL_END
